package com.sunchen.asc.service.item.repository;

import com.sunchen.asc.service.item.domain.ItemInfo;
import com.sunchen.asc.service.item.vo.ItemInfoVo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface ItemInfoRepository extends JpaRepository<ItemInfo,Long> {


    @Query("select new com.sunchen.asc.service.item.vo.ItemInfoVo(t.id,t.itemId,t.baseCode,t.businessCode,t.deptName,t.workTime,t.workPlace,t.powerSource,t.onlinePay,t.orgName,t.orgDecide,t.orgJoint,t.orgProperty,t.typeInHall,t.processTel,t.authLevel,t.runSystem,t.delivery,t.handleType,t.isReserve,t.handleForm,t.zj,t.limitNumber,t.crossScope,t.exerciseContent,t.authorityDivision,t.procedure,t.reason,t.applyCondition,t.agreeType,t.applyTimes,t.lawTime,t.agreeTime,t.agreeTimeReason,t.advisoryPhone,t.advisoryAddress,t.complainPhone,t.complainAddress,t.problem,t.assess) from ItemInfo t where t.itemId = ?1")
    ItemInfoVo getVoByItemId(Long id);
}
